package top.zhangjianyong.blog.params.comment;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 评论保存参数
 *
 * @author zhangjianyong
 * @since 2024/12/19
 */
public record CommentSaveParam(
    @NotNull(message = "博客ID不能为空") Long blogId,
    Long parentId,
    Long replyToUserId,
    @Size(max = 50, message = "回复用户昵称长度不能超过50") String replyToNickname,
    @NotBlank(message = "评论内容不能为空") @Size(min = 1, max = 1000, message = "评论内容长度必须在1-1000字符之间")
        String content,
    @NotBlank(message = "昵称不能为空") @Size(min = 1, max = 50, message = "昵称长度必须在1-50字符之间")
        String nickname,
    @Email(message = "邮箱格式不正确") @Size(max = 100, message = "邮箱长度不能超过100") String email,
    @Size(max = 200, message = "网站URL长度不能超过200") String website) {}
